package com.piano.manage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.piano.manage.mapper.TInstrumentMapper;
import com.piano.manage.domain.TInstrument;
import com.piano.manage.service.ITInstrumentService;
import com.piano.common.support.Convert;

/**
 * 设备 服务层实现
 * 
 * @author pinao
 * @date 2019-03-02
 */
@Service
public class TInstrumentServiceImpl implements ITInstrumentService 
{
	@Autowired
	private TInstrumentMapper tInstrumentMapper;

	/**
     * 查询设备信息
     * 
     * @param id 设备ID
     * @return 设备信息
     */
    @Override
	public TInstrument selectTInstrumentById(Integer id)
	{
	    return tInstrumentMapper.selectTInstrumentById(id);
	}
	
	/**
     * 查询设备列表
     * 
     * @param tInstrument 设备信息
     * @return 设备集合
     */
	@Override
	public List<TInstrument> selectTInstrumentList(TInstrument tInstrument)
	{
	    return tInstrumentMapper.selectTInstrumentList(tInstrument);
	}
	
    /**
     * 新增设备
     * 
     * @param tInstrument 设备信息
     * @return 结果
     */
	@Override
	public int insertTInstrument(TInstrument tInstrument)
	{
	    return tInstrumentMapper.insertTInstrument(tInstrument);
	}
	
	/**
     * 修改设备
     * 
     * @param tInstrument 设备信息
     * @return 结果
     */
	@Override
	public int updateTInstrument(TInstrument tInstrument)
	{
	    return tInstrumentMapper.updateTInstrument(tInstrument);
	}

	/**
     * 删除设备对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTInstrumentByIds(String ids)
	{
		return tInstrumentMapper.deleteTInstrumentByIds(Convert.toStrArray(ids));
	}
	
}
